package UseIO.UseFileInOutStream;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileInputAndOutput {
    public static void main(String[] args) throws IOException {
       UseFileInputStream();
    }
    public static void UseFileOutStream() throws IOException{
        FileOutputStream file = new FileOutputStream("8.内置模块/UseIO/ChangeFileContent.txt");
        file.write(98);
        file.close();
        String a = "12m3";
        char c = a.charAt(1);
        System.out.println(c);
    }
    public static void UseFileInputStream() throws IOException {
        FileInputStream fileInputStream = new FileInputStream("8.内置模块/UseIO/ChangeFileContent.txt");
        int read = fileInputStream.read();
        System.out.println((char) read);
        fileInputStream.close();
    }

}
